package controllers

import (
	beego "github.com/beego/beego/v2/server/web"
	"week/models"
)

type BarrageListController struct {
	beego.Controller
}

func (b *BarrageListController) BarrageList() {
	anchor, _ := b.GetInt("anchor")
	barrage, _ := models.GetBarrageAll(models.Barrage3{GroupId: anchor})
	b.Data["json"] = map[string]interface{}{
		"code": 200,
		"msg":  "查询弹幕成功",
		"data": barrage,
	}
	b.ServeJSON()
}
